import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics',
    method: 'get',
    params: query
  })
}

export function create(data) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics',
    method: 'post',
    data
  })
}

export function update(id, data) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics/' + id,
    method: 'put',
    data
  })
}

export function findById(id) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics/' + id,
    method: 'get'
  })
}

export function findByPoolId(id) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics/detail?pool_id=' + id,
    method: 'get'
  })
}

export function deleteById(id) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics/' + id,
    method: 'delete'
  })
}

export function deleteByIdBatch(data) {
  return request({
    url: '/admin/v0.1/waterpoolstatistics/batch',
    method: 'post',
	data
  })
}

